#ifndef XMLRPC
#define XMLRPC

#include <xmlrpctypes.h>

namespace XmlRpc
{
class CXmlRpcClient;

class CXmlRpcResult : public CBase
	{
	friend class CXmlRpcClient;
	
public:
	IMPORT_C CXmlRpcResult();
	IMPORT_C ~CXmlRpcResult();
	IMPORT_C TInt ErrorCode();
	IMPORT_C void SetErrorCode(TInt aErrorCode);
	IMPORT_C const CValue* Result();
	IMPORT_C void SetResult(const CValue* aResult);
	
private:
	int iErrorCode;
	const CValue* iResult;
	};

class CXmlRpcClient
	{
public:
	CXmlRpcClient* NewL(const TDesC& aUrl);
	~CXmlRpcClient();

	CXmlRpcResult* ExecuteL(RPointerArray<CValue>& aParams);
private:
	CXmlRpcClient(const TDesC& aUrl);
	
	};

/**
Utility class for converting between Unicode strings and UTF8+xml entities
*/
class XmlEncoding
	{
public:
	IMPORT_C static void DecodeL(const TDesC8& aInputString, RBuf& aOutputString);
	IMPORT_C static void EncodeL(const TDesC& aInputString, RBuf8& aOutputString);
	};
}

#endif
